package com.welsy.iter.business
{
	import mx.rpc.Fault;
	import mx.rpc.events.FaultEvent;
	import mx.rpc.events.ResultEvent;
	import mx.rpc.soap.mxml.WebService;	
	import mx.rpc.AbstractOperation;
	import com.adobe.cairngorm.business.ServiceLocator;
	import mx.rpc.IResponder;
	import mx.rpc.AsyncToken;
	import flash.utils.setTimeout;	
	import com.welsy.iter.vo.IterVO;
	import mx.collections.XMLListCollection;		

	/**
	 * @version	$Revision: 1.1 $
	 */
	public class PublishIterDelegate
	{
		public function PublishIterDelegate( responder : IResponder )
		{		
			this.service = ServiceLocator.getInstance().getWebService("iterServices") as WebService;
			var o:AbstractOperation = service.getOperation("PublishIter");
			//o.addEventListener(ResultEvent.RESULT, GetCourseComponents_onResult);
			this.responder = responder;
		}
										
		public function publishIter(id:int) : void
		{	
					
			var o:AbstractOperation = service.getOperation("PublishIter");
			o.arguments.PublishIterRequest.IterId = id;
			
			var token:AsyncToken = service.PublishIter();
			// notify this command when the service call completes
			token.addResponder( responder );
		}	
		
		private var responder : IResponder;
		private var service : Object;
	}

}